<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">考生:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_id" data-rule="required" data-source="rexam/user/index" data-primary-key="user_id" data-field="name" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">考试:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-rexam_id" data-rule="required" data-source="rexam/rexam/index" class="form-control selectpage" name="row[rexam_id]" type="text" value="{$row.rexam_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">考题:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-rexamquestion_ids" data-rule="required" data-source="rexam/question/index" data-field="title" data-multiple="true" class="form-control selectpage" name="row[rexamquestion_ids]" type="text" value="{$row.rexamquestion_ids|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Answerjson')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <dl class="fieldlist" data-template="answeroptionstpl" data-name="row[answerjson]">
                <dd>
                    <ins style="width:50px">题号</ins>
                    <ins style="width:200px">回答</ins>
                    <ins style="width:50px">结果</ins>
                </dd>
                <dd style="display: none;"><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                <textarea name="row[answerjson]" class="form-control hide" cols="30" rows="5">{$row.answerjson|htmlentities}</textarea>
            </dl>
            <script id="answeroptionstpl" type="text/html">
                <dd class="form-inline">
                    <ins style="width:50px"><%=row.qid%></ins>
                    <ins style="width:200px"><%=row.ans%></ins>
                    <ins style="width:50px"><%=row.res?"正确":"错误"%></ins>
                </dd>
            </script>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Question_count')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-question_count" class="form-control" name="row[question_count]" type="number" value="{$row.question_count|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Right_count')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-right_count" class="form-control" name="row[right_count]" type="number" value="{$row.right_count|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Points')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-points" class="form-control" name="row[points]" type="number" value="{$row.points|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Begintime')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-begintime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[begintime]" type="text" value="{:$row.begintime?datetime($row.begintime):''}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Overtime')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-overtime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[overtime]" type="text" value="{:$row.overtime?datetime($row.overtime):''}">
        </div>
    </div>
</form>
